\(\int \sin (c+d x) (a+b \tan (c+d x)) \, dx\) [15]
Optimal result
Integrand size = 17, antiderivative size = 37 \[
\int \sin (c+d x) (a+b \tan (c+d x)) \, dx=\frac {b \text {arctanh}(\sin (c+d x))}{d}-\frac {a \cos (c+d x)}{d}-\frac {b \sin (c+d x)}{d}
\]
[Out]
b*arctanh(sin(d*x+c))/d-a*cos(d*x+c)/d-b*sin(d*x+c)/d
Rubi [A] (verified)
Time = 0.05 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of
steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3598, 2718, 2672, 327, 212}
\[
\int \sin (c+d x) (a+b \tan (c+d x)) \, dx=-\frac {a \cos (c+d x)}{d}+\frac {b \text {arctanh}(\sin (c+d x))}{d}-\frac {b \sin (c+d x)}{d}
\]
[In]
Int[Sin[c + d*x]*(a + b*Tan[c + d*x]),x]
[Out]
(b*ArcTanh[Sin[c + d*x]])/d - (a*Cos[c + d*x])/d - (b*Sin[c + d*x])/d
Rule 212
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])
Rule 327
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
c, n, m, p, x]
Rule 2672
Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, a*(Sin[e + f*x]/ff)
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]
Rule 2718
Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Rule 3598
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[Expand[Sin[e
+ f*x]^m*(a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IGtQ[n, 0]
Rubi steps \begin{align*}
\text {integral}& = \int (a \sin (c+d x)+b \sin (c+d x) \tan (c+d x)) \, dx \\ & = a \int \sin (c+d x) \, dx+b \int \sin (c+d x) \tan (c+d x) \, dx \\ & = -\frac {a \cos (c+d x)}{d}+\frac {b \text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d} \\ & = -\frac {a \cos (c+d x)}{d}-\frac {b \sin (c+d x)}{d}+\frac {b \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d} \\ & = \frac {b \text {arctanh}(\sin (c+d x))}{d}-\frac {a \cos (c+d x)}{d}-\frac {b \sin (c+d x)}{d} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.02 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.30
\[
\int \sin (c+d x) (a+b \tan (c+d x)) \, dx=\frac {b \text {arctanh}(\sin (c+d x))}{d}-\frac {a \cos (c) \cos (d x)}{d}+\frac {a \sin (c) \sin (d x)}{d}-\frac {b \sin (c+d x)}{d}
\]
[In]
Integrate[Sin[c + d*x]*(a + b*Tan[c + d*x]),x]
[Out]
(b*ArcTanh[Sin[c + d*x]])/d - (a*Cos[c]*Cos[d*x])/d + (a*Sin[c]*Sin[d*x])/d - (b*Sin[c + d*x])/d
Maple [A] (verified)
Time = 0.38 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.08
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {-a \cos \left (d x +c \right )+b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) |
\(40\) |
default |
\(\frac {-a \cos \left (d x +c \right )+b \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) |
\(40\) |
risch |
\(\frac {i {\mathrm e}^{i \left (d x +c \right )} b}{2 d}-\frac {{\mathrm e}^{i \left (d x +c \right )} a}{2 d}-\frac {i {\mathrm e}^{-i \left (d x +c \right )} b}{2 d}-\frac {{\mathrm e}^{-i \left (d x +c \right )} a}{2 d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}\) |
\(101\) |
| | |
|
|
|
[In]
int(sin(d*x+c)*(a+b*tan(d*x+c)),x,method=_RETURNVERBOSE)
[Out]
1/d*(-a*cos(d*x+c)+b*(-sin(d*x+c)+ln(sec(d*x+c)+tan(d*x+c))))
Fricas [A] (verification not implemented)
none
Time = 0.27 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.32
\[
\int \sin (c+d x) (a+b \tan (c+d x)) \, dx=-\frac {2 \, a \cos \left (d x + c\right ) - b \log \left (\sin \left (d x + c\right ) + 1\right ) + b \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, b \sin \left (d x + c\right )}{2 \, d}
\]
[In]
integrate(sin(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="fricas")
[Out]
-1/2*(2*a*cos(d*x + c) - b*log(sin(d*x + c) + 1) + b*log(-sin(d*x + c) + 1) + 2*b*sin(d*x + c))/d
Sympy [F]
\[
\int \sin (c+d x) (a+b \tan (c+d x)) \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right ) \sin {\left (c + d x \right )}\, dx
\]
[In]
integrate(sin(d*x+c)*(a+b*tan(d*x+c)),x)
[Out]
Integral((a + b*tan(c + d*x))*sin(c + d*x), x)
Maxima [A] (verification not implemented)
none
Time = 0.22 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.24
\[
\int \sin (c+d x) (a+b \tan (c+d x)) \, dx=\frac {b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right ) - 2 \, \sin \left (d x + c\right )\right )} - 2 \, a \cos \left (d x + c\right )}{2 \, d}
\]
[In]
integrate(sin(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="maxima")
[Out]
1/2*(b*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1) - 2*sin(d*x + c)) - 2*a*cos(d*x + c))/d
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1020 vs. \(2 (37) = 74\).
Time = 0.42 (sec) , antiderivative size = 1020, normalized size of antiderivative = 27.57
\[
\int \sin (c+d x) (a+b \tan (c+d x)) \, dx=\text {Too large to display}
\]
[In]
integrate(sin(d*x+c)*(a+b*tan(d*x+c)),x, algorithm="giac")
[Out]
-1/2*(b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1
/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 +
tan(1/2*c)^2 + 1))*tan(1/2*d*x)^2*tan(1/2*c)^2 - b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1
/2*c) - 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1)/(tan(
1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a*tan(1/2*d*x)^2
*tan(1/2*c)^2 + b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + 2*tan(1/2*d*x)*tan(1/2*c)
^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2
*d*x)^2 + tan(1/2*c)^2 + 1))*tan(1/2*d*x)^2 - b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*
c) - 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1)/(tan(1/2
*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1))*tan(1/2*d*x)^2 - 4*b*tan(1/2*d*x)^2*tan(1/2*c) + b*
log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*c) + 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^
2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*
c)^2 + 1))*tan(1/2*c)^2 - b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^2*tan(1/2*c) - 2*tan(1/2*d*x)*
tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2
+ tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1))*tan(1/2*c)^2 - 4*b*tan(1/2*d*x)*tan(1/2*c)^2 - 2*a*tan(1/2*d*x)^2 - 8*a
*tan(1/2*d*x)*tan(1/2*c) - 2*a*tan(1/2*c)^2 + b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2*tan(1/2*
c) + 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1)/(tan(1/2
*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1)) - b*log(2*(tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*
d*x)^2*tan(1/2*c) - 2*tan(1/2*d*x)*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c
) + 1)/(tan(1/2*d*x)^2*tan(1/2*c)^2 + tan(1/2*d*x)^2 + tan(1/2*c)^2 + 1)) + 4*b*tan(1/2*d*x) + 4*b*tan(1/2*c)
+ 2*a)/(d*tan(1/2*d*x)^2*tan(1/2*c)^2 + d*tan(1/2*d*x)^2 + d*tan(1/2*c)^2 + d)
Mupad [B] (verification not implemented)
Time = 4.22 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.43
\[
\int \sin (c+d x) (a+b \tan (c+d x)) \, dx=\frac {2\,b\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,a+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}
\]
[In]
int(sin(c + d*x)*(a + b*tan(c + d*x)),x)
[Out]
(2*b*atanh(tan(c/2 + (d*x)/2)))/d - (2*a + 2*b*tan(c/2 + (d*x)/2))/(d*(tan(c/2 + (d*x)/2)^2 + 1))